home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15439 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: grimsel.zurich.ibm.com!usenet
  2. From: wgk@zurich.ibm.com (Keith Whittingham)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Preprocessor derectives is insufficient for me
  5. Date: 5 Apr 1996 14:12:05 GMT
  6. Organization: IBM Research, ZRH
  7. Message-ID: <4k39nl$lhn@grimsel.zurich.ibm.com>
  8. References: <ABY08OnW53@npn-price.pskov.su> <DpCEpL.Dtv@mv.mv.com>
  9. Reply-To: wgk@zurich.ibm.com
  10. NNTP-Posting-Host: pine.zurich.ibm.com
  11. X-Newsreader: IBM NewsReader/2 v1.00
  12.  
  13. In <DpCEpL.Dtv@mv.mv.com>, ENGR@GSSI.MV.COM (Michael Furman) writes:
  14. >In article <ABY08OnW53@npn-price.pskov.su>, ivl@npn-price.pskov.su says...
  15. >>
  16. >>Hello all!
  17. >>
  18. >>Just look at this code
  19. >>
  20. >>#define DECLARE_CLASS(first_class,second_class,name_class)     \
  21. >>class name_class : virtual public first_class , virtual public second_class 
  22. >    
  23. >>\
  24. >>{       \
  25. >>public: \
  26. >>        name_class();   \
  27. >>        ~name_class();  \
  28. >>public: \
  29. >>        virtual base* operator&(classA&) \
  30. >>        virtual base* operator&(classB&) \
  31. >
  32. >You want to generate some C++ code automatically. C/C++ preprocessor
  33. >was not designed for this kind of work. I would recommend you use some
  34. >universal macroprocessor or just make your own generator.
  35. >
  36. >-- 
  37.  
  38. I would go even further and suggest that the stuff in the macro problably
  39. needs to be in a base class. Time for a design re-evaluation?
  40.  
  41. Keith
  42.  
  43.  
  44.